<!--#include file="pjson.asp"-->
<!DOCTYPE html>
<html>

<head>
    <title>教研活动</title>
    <%
easp.include "h.asp"
%>
        <style>
            #bkjx_xgwj_add {
                margin-left: 15px;
            }
            
            #jxrw_add {
                margin-left: 15px;
            }
            
            #jxgzltj_add {
                margin-left: 15px;
            }
        </style>
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-row">
            <div class="layui-col-md6">
                <div class="layui-panel">
                    <div style="padding: 30px;">
                        <%Echo blockquote("相关文件")
                      Echo input1("wjm1","文件名","1")
                    %> <button type="button" class="layui-btn" lay-submit id="bkjx_xgwj_add" lay-filter="bkjx_xgwj_add">新增</button>
                            <script type="text/html" id="barDemo1">
                                <a class="layui-btn layui-btn-xs" lay-event="d1">下载文件</a>
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="bkjx_xgwj_del">删除</a>
                            </script>
                            <table id="bkjx_xgwj" lay-filter="bkjx_xgwj"></table><br>


                    </div>
                </div>
            </div>
            <div class="layui-col-md6">
                <div class="layui-panel">
                    <div style="padding: 30px;">
                        <%Echo blockquote("教学任务")
                      Echo input1("wjm2","文件名","1")
                    %> <button type="button" class="layui-btn" lay-submit id="jxrw_add" lay-filter="jxrw_add">新增</button>
                            <script type="text/html" id="barDemo2">
                                <a class="layui-btn layui-btn-xs" lay-event="d2">下载文件</a>
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="jxrw_del">删除</a>
                            </script>
                            <table id="jxrw" lay-filter="jxrw"></table><br>
                    </div>
                </div>
            </div>
            <div class="layui-col-md6">
                <div class="layui-panel">
                    <div style="padding: 30px;">
                        <%Echo blockquote("教学工作量统计")
                      Echo input1("wjm3","文件名","1")
                    %> <button type="button" class="layui-btn" lay-submit id="jxgzltj_add" lay-filter="jxgzltj_add">新增</button>
                            <script type="text/html" id="barDemo3">
                                <a class="layui-btn layui-btn-xs" lay-event="d3">下载文件</a>
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="jxgzltj_del">删除</a>
                            </script>
                            <table id="jxgzltj" lay-filter="jxgzltj"></table><br>
                    </div>
                </div>
            </div>
            <div class="layui-col-md6">
                <div class="layui-panel">
                    <div style="padding: 30px;">
                        <%Echo blockquote("教学质量")
                      Echo input1("wjm4","文件名","1")
                    %> <button type="button" class="layui-btn" lay-submit id="jxzl_add" lay-filter="jxzl_add">新增</button>
                            <script type="text/html" id="barDemo4">
                                <a class="layui-btn layui-btn-xs" lay-event="d4">下载文件</a>
                                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="jxzl_del">删除</a>
                            </script>
                            <table id="jxzl" lay-filter="jxzl"></table><br>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="/<%=rootpath%>/src/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: '/<%=rootpath%>/src/layuiadmin/'
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'useradmin', 'upload', 'table'], function() {
            var $ = layui.$,
                form = layui.form,
                admin = layui.admin,
                upload = layui.upload,
                table = layui.table;
            form.render();
            table.render({
                elem: '#bkjx_xgwj',
                url: 'pjson.asp?action=bkjx_xgwj',
                cols: [
                    [{
                            type: 'numbers'
                        }, {
                            field: 'id',
                            title: 'ID',
                            width: 60,
                            sort: true,
                            hide: true
                        },
                        <%g_tbf "name1:200,name3:0","文件名,地址"%> {
                            fixed: 'right',
                            width: 150,
                            align: 'center',
                            toolbar: '#barDemo1'
                        }
                    ]
                ],
                id: 'bkjx_xgwj',
                limit: 10,
                page: true,
                height: 475
            });
            table.render({
                elem: '#jxrw',
                url: 'pjson.asp?action=jxrw',
                cols: [
                    [{
                            type: 'numbers'
                        }, {
                            field: 'id',
                            title: 'ID',
                            width: 60,
                            sort: true,
                            hide: true
                        },
                        <%g_tbf "name1:200,name3:0","文件名,地址"%> {
                            fixed: 'right',
                            width: 150,
                            align: 'center',
                            toolbar: '#barDemo2'
                        }
                    ]
                ],
                id: 'jxrw',
                limit: 10,
                page: true,
                height: 475
            });
            table.render({
                elem: '#jxgzltj',
                url: 'pjson.asp?action=jxgzltj',
                cols: [
                    [{
                            type: 'numbers'
                        }, {
                            field: 'id',
                            title: 'ID',
                            width: 60,
                            sort: true,
                            hide: true
                        },
                        <%g_tbf "name1:200,name3:0","文件名,地址"%> {
                            fixed: 'right',
                            width: 150,
                            align: 'center',
                            toolbar: '#barDemo3'
                        }
                    ]
                ],
                id: 'jxgzltj',
                limit: 10,
                page: true,
                height: 475
            });
            table.render({
                elem: '#jxzl',
                url: 'pjson.asp?action=jxzl',
                cols: [
                    [{
                            type: 'numbers'
                        }, {
                            field: 'id',
                            title: 'ID',
                            width: 60,
                            sort: true,
                            hide: true
                        },
                        <%g_tbf "name1:200,name3:0","文件名,地址"%> {
                            fixed: 'right',
                            width: 150,
                            align: 'center',
                            toolbar: '#barDemo4'
                        }
                    ]
                ],
                id: 'jxzl',
                limit: 10,
                page: true,
                height: 475
            });
            upload.render({
                elem: '#bkjx_xgwj_add',
                url: location.protocol + '//' + location.host + '/dzps/upf.asp?' + 'now=' + new Date().getTime(),
                accept: 'file', //普通文件
                exts: 'zip|rar|7z|pdf|qes|doc|docx|bmp|jpg' //允许上传
                    ,
                done: function(res) {
                    var wjm = $('#wjm1').val();
                    console.log(res);
                    layer.msg('上传成功！！');
                    $("#i_sfz_d").val(res.msg);
                    $.post('pjson.asp?now=' + new Date().getTime(), {
                            action: "bkjx_xgwj_add",
                            name1: wjm,
                            name3: res.msg,
                            mode: "25"
                        },
                        function(data) {
                            layer.msg(data);
                            table.reload('bkjx_xgwj');
                        });


                }
            });

            upload.render({
                elem: '#jxrw_add',
                url: location.protocol + '//' + location.host + '/dzps/upf.asp?' + 'now=' + new Date().getTime(),
                accept: 'file', //普通文件

                exts: 'zip|rar|7z|pdf|qes|doc|docx|bmp|jpg' //允许上传
                    ,
                done: function(res) {
                    var wjm = $('#wjm2').val();
                    console.log(res);
                    layer.msg('上传成功！！');
                    $("#i_sfz_d").val(res.msg);
                    $.post('pjson.asp?now=' + new Date().getTime(), {
                            action: "jxrw_add",
                            name1: wjm,
                            name3: res.msg,
                            mode: "26"
                        },
                        function(data) {
                            layer.msg(data);
                            table.reload('jxrw');
                        });

                }
            });
            upload.render({
                elem: '#jxgzltj_add',
                url: location.protocol + '//' + location.host + '/dzps/upf.asp?' + 'now=' + new Date().getTime(),
                accept: 'file', //普通文件

                exts: 'zip|rar|7z|pdf|qes|doc|docx|bmp|jpg' //允许上传
                    ,
                done: function(res) {
                    var wjm = $('#wjm3').val();
                    console.log(res);
                    layer.msg('上传成功！！');
                    $("#i_sfz_d").val(res.msg);
                    $.post('pjson.asp?now=' + new Date().getTime(), {
                            action: "jxgzltj_add",
                            name1: wjm,
                            name3: res.msg,
                            mode: "27"
                        },
                        function(data) {
                            layer.msg(data);
                            table.reload('jxgzltj');
                        });

                }
            });
            upload.render({
                elem: '#jxzl_add',
                url: location.protocol + '//' + location.host + '/dzps/upf.asp?' + 'now=' + new Date().getTime(),
                accept: 'file', //普通文件

                exts: 'zip|rar|7z|pdf|qes|doc|docx|bmp|jpg' //允许上传
                    ,
                done: function(res) {
                    var wjm = $('#wjm4').val();
                    console.log(res);
                    layer.msg('上传成功！！');
                    $("#i_sfz_d").val(res.msg);
                    $.post('pjson.asp?now=' + new Date().getTime(), {
                            action: "jxzl_add",
                            name1: wjm,
                            name3: res.msg,
                            mode: "28"
                        },
                        function(data) {
                            layer.msg(data);
                            table.reload('jxgzltj');
                        });

                }
            });            
            table.on('tool(jxrw)',
                function(obj) {
                    var data = obj.data;
                    if (obj.event === 'd2') {
                        var _this = $(this);
                        window.location.href = "http://ab.yjk99.net/dzps/upload/" + data.name3;
                    } else if (obj.event === 'jxrw_del') {
                        var _this = $(this);
                        layer.confirm('您确定删除此信息？' + data.id, {
                                icon: 3,
                                title: '提示信息'
                            },
                            function(index) {
                                $.post('pjson.asp?now=' + new Date().getTime(), {
                                        id: data.id,
                                        name3:data.name3,
                                        action: "jxrw_del"
                                    },
                                    function(data) {
                                        layer.msg(data);
                                    });
                                layer.close(index);
                                table.reload('jxrw');
                            });
                    }
                });
            table.on('tool(jxgzltj)',
                function(obj) {
                    var data = obj.data;
                    if (obj.event === 'd3') {
                        var _this = $(this);
                        window.location.href = "http://ab.yjk99.net/dzps/upload/" + data.name3;
                    } else if (obj.event === 'jxgzltj_del') {
                        var _this = $(this);
                        layer.confirm('您确定删除此信息？' + data.id, {
                                icon: 3,
                                title: '提示信息'
                            },
                            function(index) {
                                $.post('pjson.asp?now=' + new Date().getTime(), {
                                        id: data.id,
                                        name3:data.name3,
                                        action: "jxgzltj_del"
                                    },
                                    function(data) {
                                        layer.msg(data);
                                    });
                                layer.close(index);
                                table.reload('jxgzltj');
                            });
                    }
                });
            table.on('tool(bkjx_xgwj)',
                function(obj) {
                    var data = obj.data;
                    if (obj.event === 'd1') {
                        var _this = $(this);
                        window.location.href = "http://ab.yjk99.net/dzps/upload/" + data.name3;
                    } else if (obj.event === 'bkjx_xgwj_del') {
                        var _this = $(this);
                        layer.confirm('您确定删除此信息？' + data.id, {
                                icon: 3,
                                title: '提示信息'
                            },
                            function(index) {
                                $.post('pjson.asp?now=' + new Date().getTime(), {
                                        id: data.id,
                                        name3:data.name3,
                                        action: "bkjx_xgwj_del"
                                    },
                                    function(data) {
                                        layer.msg(data);
                                    });
                                layer.close(index);
                                table.reload('bkjx_xgwj');
                            });
                    }
                });
            table.on('tool(jxzl)',
                function(obj) {
                    var data = obj.data;
                    if (obj.event === 'd4') {
                        var _this = $(this);
                        window.location.href = "http://ab.yjk99.net/dzps/upload/" + data.name3;
                    } else if (obj.event === 'jxzl_del') {
                        var _this = $(this);
                        layer.confirm('您确定删除此信息？' + data.id, {
                                icon: 3,
                                title: '提示信息'
                            },
                            function(index) {
                                $.post('pjson.asp?now=' + new Date().getTime(), {
                                        id: data.id,
                                        name3:data.name3,
                                        action: "jxzl_del"
                                    },
                                    function(data) {
                                        layer.msg(data);
                                    });
                                layer.close(index);
                                table.reload('jxzl');
                            });
                    }
                });                

        });
    </script>
</body>

</html>